package com.farewell.hotel.controller;

import com.farewell.hotel.pojo.RoomType;
import com.farewell.hotel.service.RoomTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Farewell
 * @date 2021/4/26
 */
@Controller
public class RoomTypeController {
    @Autowired
    private RoomTypeService roomTypeService;

    @RequestMapping("getAllRoomType.do")
    @ResponseBody
    public List<RoomType> getAllRoomType() {
        return roomTypeService.getAllRoomType();
    }
}
